<script type='text/javascript' src="<?php echo $this->basePath('public/css/dbblack/js/artdialog/artDialog.js?skin=simple'); ?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('public/css/dbblack/js/form/style.css'); ?>"/>
<script type='text/javascript' src="<?php echo $this->basePath('public/css/dbblack/js/form/form.js'); ?>"></script>
<link type="text/css" rel="stylesheet" href="<?php echo $this->basePath('public/css/dbblack/css/ucenter.css'); ?>" />
<script type="text/javascript" charset="UTF-8" src="<?php echo $this->basePath('public/css/dbblack/js/jquery.iframe-post-form.js'); ?>"></script>
<div class="container clearfix">
    <?php echo $this->partial('shopfront/home/left_menu.phtml'); ?>
    <div class=" clearfix uc-content" >
        <h1 class="title"><span><?php echo $this->translate('用户中心'); ?>：</span></h1>
        <dl class="ucenter-index clearfix">
            <dt class="sub-1 clearfix">
                <img id="head-pic" class="ie6png" src="<?php echo $this->basePath($this->frontwebsite()->getUserSession('user_avatar')); ?>" width="120" height="120">
            <p style="padding: 10px 30px;"><a href="<?php echo $this->url('fronthome/default', array('action'=>'useredit')); ?>" ><?php echo $this->translate('修改头像'); ?></a></p>
            </dt>
            <dd class="sub-2">
                <table width="100%" class="simple">
                    <tr>
                        <td colspan=2><b><a href="<?php echo $this->url('fronthome/default', array('action'=>'useredit')); ?>"><?php echo $this->frontwebsite()->getUserSession('user_name'); ?></a></b>，<?php echo $this->translate('欢迎你'); ?>！</td>
                    </tr>
                    <tr>
                        <td width="50%"><?php echo $this->translate('用户等级'); ?>：<?php echo $this->frontwebsite()->getUserSession('user_group_name'); ?></td>
                        <td width="50%"><?php echo $this->translate('消费积分'); ?>：<?php echo $this->user_info->user_integral_num; ?></td>
                    </tr>
                    <tr>
                        <td><?php echo $this->translate('账户余额'); ?>：<?php echo $this->frontwebsite()->shopPriceExtend($this->user_info->user_money); ?> <a href="<?php echo $this->url('frontmoney/default'); ?>" class="btn btn-primary btn-mini"><?php echo $this->translate('充值'); ?></a></td>
                        <td><?php echo $this->translate('等级积分'); ?>：<?php echo $this->user_info->integral_type_2_num; ?></td>
                    </tr>
                    <tr>
                        <td colspan="2"><?php echo $this->translate('用户提醒'); ?>：
                            <a href="<?php echo $this->url('frontorder/default/order_state', array('action'=>'index', 'order_state'=>10)); ?>"><?php echo $this->translate('待支付订单'); ?>(<strong style="color: red;"><?php echo $this->order_state_num[10]; ?></strong>)</a>&nbsp;&nbsp;
                            <a href="<?php echo $this->url('frontorder/default/order_state', array('action'=>'index', 'order_state'=>30)); ?>"><?php echo $this->translate('待发货订单'); ?>(<strong style="color: red;"><?php echo $this->order_state_num[30]; ?></strong>)</a>&nbsp;&nbsp;
                            <a href="<?php echo $this->url('frontorder/default/order_state', array('action'=>'index', 'order_state'=>40)); ?>"><?php echo $this->translate('已发货订单'); ?>(<strong style="color: red;"><?php echo $this->order_state_num[40]; ?></strong>)</a>
                        </td>
                    </tr>
                </table>
            </dd>

            <dd style="margin-top: 60px;">
                <table class="simple">
                    <tr>
                        <th><?php echo $this->translate('订单编号'); ?></th>
                        <th width="100"><?php echo $this->translate('收货人'); ?></th>
                        <th width="100"><?php echo $this->translate('订单金额'); ?></th>
                        <th width="160"><?php echo $this->translate('下单时间'); ?></th>
                        <th width="100"><?php echo $this->translate('订单状态'); ?></th>
                        <th width="160"><?php echo $this->translate('操作'); ?></th>
                    </tr>
                    <?php foreach ($this->order_list as $order_key => $order_value) {
                        ?>
                        <tr class="<?php if ($order_key%2==1) echo 'even'; else echo 'odd'; ?>">
                            <td><a href="<?php echo $this->url('frontorder/default/order_id', array('action'=>'showorder', 'order_id'=>$order_value['order_id'], 'order_state'=>$this->order_state, 'page'=>$this->page)); ?>"><?php echo $order_value['order_sn']; ?></a></td>
                            <td><?php echo $this->escapeHtml($order_value['delivery_name']); ?></td>
                            <td><?php echo $order_value['currency_symbol'] . $order_value['order_amount'] . $order_value['currency_unit']; ?></td>
                            <td><?php echo date("Y-m-d H:i:s",$order_value['order_time']); ?></td>
                            <td>
                                <?php echo $this->frontwebsite()->getOneOrderStateInfo($order_value['order_state']); ?>
                            </td>
                            <td>
                                <p><a href="<?php echo $this->url('frontorder/default/order_id', array('action'=>'showorder', 'order_id'=>$order_value['order_id'], 'order_state'=>$this->order_state, 'page'=>$this->page)); ?>"><?php echo $this->translate('查看订单'); ?></a></p>
                            </td>
                        </tr>
                    <?php } ?>
                </table>
            </dd>
        </dl>
    </div>
</div>
